#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
//https://www.luogu.com.cn/problem/P2669
using namespace std;


int cnt = 1;
int tmp = 1;
int k;
int sum = 0;

int main()
{
	cin >> k;
	for (int i = 1; i <= k; ++i)
	{
		if (cnt)
		{
		}
		else
		{
			tmp++;
			cnt = tmp;
		}
		sum += tmp;
		cnt--;
	}
	cout << sum << endl;

	return 0;
}